/*
 * CsvLoader.h
 *
 *  Created on: 31.10.2012
 *      Author: fs
 */

#ifndef CSVLOADER_H_
#define CSVLOADER_H_

#include <vector>
#include <iostream>
#include "DataTypes.h"

class CsvLoader
{
public:
	CsvLoader();
	virtual ~CsvLoader();
	int loadFile(std::string fileName);

	data* getData();

private:

	void replaceDecimalSepar(char* chars);
	int strigToInt(char* time);
	int nextLine(char* line, char* result, int start_index);
	void parseLine(char* line, int* time, double* bg, double* ig);

	data* dataItems;

};

#endif /* CSVLOADER_H_ */
